package org.yy.dao;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import org.yy.po.Position;
import org.yy.po.PositionDetail;

public interface PositionDetailDao extends JpaRepository<PositionDetail, Long> {

    @Query(value = "select p.id,p.name,p.salary,p.city,pd.description from  position p inner join position_detail pd on(p.id=pd.pid) where p.id=:id",nativeQuery = true)
    Object findPositionById(@Param("id") Long id);

}
